package cn.com.roy.thread.t3_1_11.p_r_test;

public class TreadP implements Runnable{
    private String lock ;
    private P p;
    public TreadP (P p){
        this.p = p;
    }
    public void run() {
        while (true){
            p.setValue();
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
